<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Mad Voter</title>
    <script src = "http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js" type = "text/javascript"></script>
</head>
<body>
    <h1 style="text-align:left">Times: <p id = "times" ></p></h1>
    <iframe id="outSideWeb"></iframe>
    
<script>
    $(document).ready(function(){
        var times = 0;
        var iframe;
        loadAndShow();
        function loadAndShow() {  
            iframe = document.getElementById("outSideWeb");  
            iframe.onload = iframe.onreadystatechange = iframeload;   
            iframe.src = "http://12316szntp.bjzntd.com/JSON/NVoteSubmit.ashx?NewsID=10468&Type=0";  
        };
        function iframeload() {
            if (!iframe.readyState || iframe.readyState == "complete") {
                if(confirm("显示的结果为1")){
                    var doTimes = prompt("请输入请求次数：","50")
                    for(i=0;i++;i<doTimes){
                        iframe = document.getElementById("outSideWeb");  
                        iframe.src = "http://12316szntp.bjzntd.com/JSON/NVoteSubmit.ashx?NewsID=10468&Type=0";
                        $("#times").html(i+1)
                        console.log(i)
                    }
                }
                // if(times < 51){
                //     $("#times").html(times);                    
                //     load();
                //     times = times + 1;
                // }
            ;}
        };
    });
      


    // function test(){
    //     for(i=1;i++;i<2){
    //         setTimeout(requestOtherLink(), 20);
    //     }
    // }
    // function requestOtherLink(){
    //     var script = document.createElement("script");
    //     script.src = "http://12316szntp.bjzntd.com/JSON/NVoteSubmit.ashx?NewsID=10468&Type=0";
    //     document.getElementsByTagName("head")[0].appendChild(script);
    // }
</script>
</body>
</html>